<template>
	<view class="news-container">
		<view class="news-item" v-for="(item, i) in info" :key="i">{{item}}</view>
	</view>
</template>

<script>
	import service from '../../utils/http.js'
	export default {
		data() {
			return {
				info: []
			};
		},
		onLoad() {
			this.getNews()
		},
		methods: {
			getNews() {
				const newurl = '/api/common/Get60sWorldInsight'
				const worldurl = '/api/common/today'
				service.get(worldurl)
					.then(response => {
						this.info = response.result.news
					})
					.catch(error => {
						console.error(error);
					});
			}
		}
	}
</script>

<style lang="scss">
	.news-container {
		margin: 0 20px 0 20px;

		.news-item {
			line-height: 30px;
		}
	}
</style>